﻿@model S4Store.Models.Decorate.PackageCarVerionChageDetailModel
 @{
     Layout = null;
    ViewBag.Title = "PackageCarVerionChageDetail";
}
<div style="height:100%; overflow:auto">
@Html.Action("ReportBar", "Common", Model.BarModel)

 <table  style="border-collapse:collapse; width:100%" class="reporttable vmiddle">
 
 <tr>
  <th rowspan="2">车型</th>
  <th rowspan="2">车款</th>
  <th rowspan="2">标配车型计数</th>
  <th rowspan="2">套餐车更换率</th>
  <th colspan="2">上旬套餐版本（1日-10日）</th>
  <th colspan="2">中旬套餐版本（11日-20日）</th>
  <th colspan="2">下旬套餐版本（21日-30日）</th>
 </tr>
 <tr>
  <th>是/否</th>
  <th>版本计数</th>
  <th>是/否</th>
  <th>版本计数</th>
  <th>是/否</th>
  <th>版本计数</th>
 </tr>
   @for (var i = 0; i < Model.Reports.Count; i++)
   {
       var report = Model.Reports[i];
 <tr>
    @if (i == 0)
    {
   <td rowspan="@Model.Reports.Count">@Model.CarBrand.Name</td>
    }
    <td>@report.CarModel.Name</td> 
    <td>1</td>  
    <td @S4Store.Utils.GetBgColor(report.PackageVersionChangeLv>=50)>@report.PackageVersionChangeLv.toInt(0)%</td>  
    <td>@if (report.CarModelMonthConfig.IsLstTenVersion) { <text>是</text>}else{  <text>否</text>}</td> 
    <td>@if (report.CarModelMonthConfig.IsLstTenVersion) { <text>1</text>}else{  <text>0</text>}</td> 
    <td>@if (report.CarModelMonthConfig.IsMidTenVersion) { <text>是</text>}else{  <text>否</text>}</td> 
    <td>@if (report.CarModelMonthConfig.IsMidTenVersion)
        { <text>1</text>}else{  <text>0</text>}</td> 
    <td>@if (report.CarModelMonthConfig.IsLastTenVersion) { <text>是</text>}else{  <text>否</text>}</td> 
    <td>@if (report.CarModelMonthConfig.IsLastTenVersion)
        { <text>1</text>}else{  <text>0</text>}</td> 
 </tr>
     
   }
   <tr>
    <td colspan="2">@(Model.CarBrand.Name)合计</td>
    <td>@Model.Reports.Count</td>
    <td>@Model.CarBrandReport.PackageVersionChangeLv.toInt(1)%</td>
    <td></td>   
    <td>@Model.Reports.Count(t=>t.CarModelMonthConfig.IsLstTenVersion)</td>   
    <td></td>   
    <td>@Model.Reports.Count(t => t.CarModelMonthConfig.IsMidTenVersion)</td>   
    <td></td>   
    <td>@Model.Reports.Count(t => t.CarModelMonthConfig.IsLastTenVersion)</td>   
   </tr>
 </table>

</div>